<template>
	<view>
		<view class="head">
			<image src="../../static/user_bg.png"></image>
			
				<view class="mePosition">
					 <view class="hitem">
						 <u-avatar size="large" :src="data.avatarUrl"></u-avatar>
						 <view class='item_right'>
							 <view class="name">{{data.realname}}</view>
							 <view class="desc">{{data.grade+data.class}}</view>
						 </view>
					</view>
				</view>
		</view>
		
		<view class="kg"></view>
		<u-cell-group>
				<u-cell-item :arrow="false" title="姓名" v-model="data.realname"></u-cell-item>
				<u-cell-item :arrow="false" title="年级" v-model="data.grade"></u-cell-item>
				<u-cell-item :arrow="false" title="班级" v-model="data.class"></u-cell-item>
				<u-cell-item :arrow="false" title="单位名称" v-model="data.company"></u-cell-item>
				<u-cell-item :arrow="false" v-if="data.position" title="职务" v-model="data.position"></u-cell-item>
				<!-- <u-cell-item  :arrow="false" label="点击可以直接拔打" title="电话" @click="phone(data.mobile)" v-model="data.mobile"></u-cell-item> -->
			</u-cell-group>
			<auth :isauth="check_auth"></auth>
		<foot></foot>
	</view>
</template>

<script>
	export default {
		
		data() {
			return {
			data:{}
			}
		},
		onLoad:function(e){
			this.get_book(e.id)
		},
	
		methods:{
			get_book(id){
				
				this.$u.post('index.php?class=user&act=view', {
					id: id,
				}).then(res => {
					if (res.code == 0) {
						this.data=res.data
					} else {
						this.msg(res.msg)
					}
				
				});
			}
			
		}
	}
</script>

<style>
	.mePosition{ position: absolute;top: 40px;left: 0;width: 100%;left:50rpx }
	.head{ width: 100%;position: relative; }
	.head>image{ width: 750rpx;height: 280rpx;display: block; }
	.hitem{display: flex;flex-direction: row;}
	.name{font-size: 16px; margin-bottom: 20rpx; color:white}
	.desc{font-size:14px ;color:white}
	.item_right{display: flex;flex-direction: column; margin-left: 10px; justify-content: center;}
</style>
